a = [1,2]

b = []
b.append(a)
a.append(3)
print(b[0])

def f(a=[]):
    a.append(1)
    print(a)    
f()
f()

c = [[]]*10
c[0].append(2)
print(c)
c = [[] for _ in range(10)]
c[0].append(2)
print(c)

def g1():
    return [lambda x:x*i for i in range(5)]
for m in g1():
    print(m(2), end=' ')
print()
def g2():
    return [lambda x,i=i:x*i for i in range(5)]
for m in g2():
    print(m(2), end=' ')
print()

import random 
def func(ok):
    if ok:
        a = random.random()
    else:
        import random
        a = random.randint(1, 10)
    return a 
func(True)